package com.shuda.business.crm.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;

import java.time.LocalDateTime;

/**
 * 客户跟进实体类
 * 含跟进方式、状态、内容、结果、分配用户与时间信息
 */
@TableName("crm_customer_follow_up")
@Schema(name = "CustomerFollowUpEntity", description = "客户跟进实体")
public class CustomerFollowUpEntity {

    @TableId(type = IdType.AUTO)
    @Schema(description = "跟进记录ID")
    private Long id;

    @Schema(description = "客户ID")
    private Long customerId;

    @Schema(description = "客户名称")
    private String customerName;

    @Schema(description = "跟进方式(phone-电话,visit-拜访,email-邮件,wechat-微信,qq-QQ)")
    private String followUpType;

    @Schema(description = "跟进状态(pending-待跟进,completed-已完成,cancelled-已取消)")
    private String followUpStatus;

    @Schema(description = "跟进内容")
    private String followUpContent;

    @Schema(description = "跟进结果")
    private String followUpResult;

    @Schema(description = "下次跟进时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime nextFollowUpTime;

    @Schema(description = "分配用户ID")
    private Long assignedUserId;

    @Schema(description = "分配用户名称")
    private String assignedUserName;

    @Schema(description = "跟进时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime followUpTime;

    @Schema(description = "创建人")
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @Schema(description = "更新人")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateBy;

    @Schema(description = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @Schema(description = "逻辑删除标识(0-未删除,1-已删除)")
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;

    /**
     * 获取跟进记录ID
     * @return 跟进记录ID
     */
    public Long getId() { return id; }

    /**
     * 设置跟进记录ID
     * @param id 跟进记录ID
     */
    public void setId(Long id) { this.id = id; }

    /**
     * 获取客户ID
     * @return 客户ID
     */
    public Long getCustomerId() { return customerId; }

    /**
     * 设置客户ID
     * @param customerId 客户ID
     */
    public void setCustomerId(Long customerId) { this.customerId = customerId; }

    /**
     * 获取客户名称
     * @return 客户名称
     */
    public String getCustomerName() { return customerName; }

    /**
     * 设置客户名称
     * @param customerName 客户名称
     */
    public void setCustomerName(String customerName) { this.customerName = customerName; }

    /**
     * 获取跟进方式
     * @return 跟进方式
     */
    public String getFollowUpType() { return followUpType; }

    /**
     * 设置跟进方式
     * @param followUpType 跟进方式
     */
    public void setFollowUpType(String followUpType) { this.followUpType = followUpType; }

    /**
     * 获取跟进状态
     * @return 跟进状态
     */
    public String getFollowUpStatus() { return followUpStatus; }

    /**
     * 设置跟进状态
     * @param followUpStatus 跟进状态
     */
    public void setFollowUpStatus(String followUpStatus) { this.followUpStatus = followUpStatus; }

    /**
     * 获取跟进内容
     * @return 跟进内容
     */
    public String getFollowUpContent() { return followUpContent; }

    /**
     * 设置跟进内容
     * @param followUpContent 跟进内容
     */
    public void setFollowUpContent(String followUpContent) { this.followUpContent = followUpContent; }

    /**
     * 获取跟进结果
     * @return 跟进结果
     */
    public String getFollowUpResult() { return followUpResult; }

    /**
     * 设置跟进结果
     * @param followUpResult 跟进结果
     */
    public void setFollowUpResult(String followUpResult) { this.followUpResult = followUpResult; }

    /**
     * 获取下次跟进时间
     * @return 下次跟进时间
     */
    public LocalDateTime getNextFollowUpTime() { return nextFollowUpTime; }

    /**
     * 设置下次跟进时间
     * @param nextFollowUpTime 下次跟进时间
     */
    public void setNextFollowUpTime(LocalDateTime nextFollowUpTime) { this.nextFollowUpTime = nextFollowUpTime; }

    /**
     * 获取分配用户ID
     * @return 分配用户ID
     */
    public Long getAssignedUserId() { return assignedUserId; }

    /**
     * 设置分配用户ID
     * @param assignedUserId 分配用户ID
     */
    public void setAssignedUserId(Long assignedUserId) { this.assignedUserId = assignedUserId; }

    /**
     * 获取分配用户名称
     * @return 分配用户名称
     */
    public String getAssignedUserName() { return assignedUserName; }

    /**
     * 设置分配用户名称
     * @param assignedUserName 分配用户名称
     */
    public void setAssignedUserName(String assignedUserName) { this.assignedUserName = assignedUserName; }

    /**
     * 获取跟进时间
     * @return 跟进时间
     */
    public LocalDateTime getFollowUpTime() { return followUpTime; }

    /**
     * 设置跟进时间
     * @param followUpTime 跟进时间
     */
    public void setFollowUpTime(LocalDateTime followUpTime) { this.followUpTime = followUpTime; }

    /**
     * 获取创建人
     * @return 创建人
     */
    public String getCreateBy() { return createBy; }

    /**
     * 设置创建人
     * @param createBy 创建人
     */
    public void setCreateBy(String createBy) { this.createBy = createBy; }

    /**
     * 获取创建时间
     * @return 创建时间
     */
    public LocalDateTime getCreateTime() { return createTime; }

    /**
     * 设置创建时间
     * @param createTime 创建时间
     */
    public void setCreateTime(LocalDateTime createTime) { this.createTime = createTime; }

    /**
     * 获取更新人
     * @return 更新人
     */
    public String getUpdateBy() { return updateBy; }

    /**
     * 设置更新人
     * @param updateBy 更新人
     */
    public void setUpdateBy(String updateBy) { this.updateBy = updateBy; }

    /**
     * 获取更新时间
     * @return 更新时间
     */
    public LocalDateTime getUpdateTime() { return updateTime; }

    /**
     * 设置更新时间
     * @param updateTime 更新时间
     */
    public void setUpdateTime(LocalDateTime updateTime) { this.updateTime = updateTime; }

    /**
     * 获取逻辑删除标识(0-未删除,1-已删除)
     * @return 逻辑删除标识
     */
    public Integer getDeleted() { return deleted; }

    /**
     * 设置逻辑删除标识(0-未删除,1-已删除)
     * @param deleted 逻辑删除标识
     */
    public void setDeleted(Integer deleted) { this.deleted = deleted; }
}